/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jp.co.irep.juten.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author toan_nguyen
 */
@Entity
@Table(name = "catalog_num_tbl")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CatalogNumTbl.findAll", query = "SELECT c FROM CatalogNumTbl c"),
    @NamedQuery(name = "CatalogNumTbl.findByCatalogNum", query = "SELECT c FROM CatalogNumTbl c WHERE c.catalogNum = :catalogNum"),
    @NamedQuery(name = "CatalogNumTbl.findByMakerNum", query = "SELECT c FROM CatalogNumTbl c WHERE c.makerNum = :makerNum"),
    @NamedQuery(name = "CatalogNumTbl.findByFormtype", query = "SELECT c FROM CatalogNumTbl c WHERE c.formtype = :formtype")})
public class CatalogNumTbl implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "catalog_num")
    private Short catalogNum;
    @Column(name = "maker_num")
    private Short makerNum;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "formtype")
    private Short formtype;

    public CatalogNumTbl() {
    }

    public CatalogNumTbl(Short formtype) {
        this.formtype = formtype;
    }

    public Short getCatalogNum() {
        return catalogNum;
    }

    public void setCatalogNum(Short catalogNum) {
        this.catalogNum = catalogNum;
    }

    public Short getMakerNum() {
        return makerNum;
    }

    public void setMakerNum(Short makerNum) {
        this.makerNum = makerNum;
    }

    public Short getFormtype() {
        return formtype;
    }

    public void setFormtype(Short formtype) {
        this.formtype = formtype;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (formtype != null ? formtype.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CatalogNumTbl)) {
            return false;
        }
        CatalogNumTbl other = (CatalogNumTbl) object;
        if ((this.formtype == null && other.formtype != null) || (this.formtype != null && !this.formtype.equals(other.formtype))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jp.co.irep.tech.juten.jpa.entity.CatalogNumTbl[ formtype=" + formtype + " ]";
    }
    
}
